<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>

<?php
$index = 1;
foreach($lstZone as $zone)
{
	$odd = ($index%2 == 1) ? "" : "odd";
?>
	<tr id="tr_<?php echo $zone['zoneid']; ?>" class="tr_zone <?php echo $odd; ?>">
		<td class="pad5 text-center" >
			<input type="checkbox" value="<?php echo $zone['zoneid']; ?>" class="chkZid" onclick="getZoneViewReport();" />
		</td>					
		<td class="pad5 text-center" >
			<?php echo $zone['zoneid']; ?>
		</td>
		
		<td class="pad5" >
			<?php echo $zone['zonename']; ?>
		</td>
		
		<td class="pad5 text-center" >
			<?php echo ($zone['width'] != '' && $zone['height'] != '') ? $zone['width'] . ' x ' . $zone['height'] : ''; ?>
		</td>
		
		<td class="pad5" >
			<?php
			if($zone['siteid'] > 0)
			{
			?>
				<a href="<?php echo site_url('zone/view_type') . "?s=" . $zone['siteid'] . "&fd=$fromdate&td=$todate" ?>">
					<?php echo $zone['sitename']; ?>
				</a>
				<?php echo ($zone['siteactive'] == 0 && $zone['sitename'] != '' ) ? '<img alt="Delete site" title="Delete site" src="/images/delete_icon.png" width="12" class="marleft5" />' : ''; ?>
			<?php
			}
			?>
		</td>
		
		<td class="pad5 text-right" >
			<?php echo ($zone['tc'] == '' || $zone['tc'] == -1) ? 'N/A' : number_format($zone['tc']); ?>
		</td>
		<td class="pad5 text-right" >
			<?php echo ($zone['rc'] == '' || $zone['rc'] == -1) ? 'N/A' : number_format($zone['rc']); ?>
		</td>
		<td class="pad5 text-right" >
			<?php echo ($zone['cc'] == '' || $zone['cc'] == -1) ? 'N/A' : number_format($zone['cc']); ?>
		</td>
		
		<td class="pad5 text-right" >
			<?php echo ($zone['v'] == '' || $zone['v'] == -1) ? 'N/A' : number_format($zone['v']); ?>
		</td>
		
		<td class="pad5 text-right" >
			<?php echo ($zone['ctr'] == -1 || $zone['ctr'] == '') ? 'N/A' : $zone['ctr']; ?>
		</td>
	</tr>
<?php
	$index++;
}
?>